home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2002 February
/
PCWorld_2002-02_cd.bin
/
Software
/
Vyzkuste
/
alpha
/
Script Example.aas
< prev
Wrap
Text File
|
2000-07-28
|
2KB
|
72 lines
Script Example for AlphaScript v2
Made by Folletto Malefico "@ - arcanewood@yahoo.com
---------------------------------------------------
Since now (v2.xx) you can't add normal text lines within the code.
The code starts after the !##AAS command, at the beginning of a line,
and after that you can add only AAS commands.
The comments are allowed, only at the and of a line and signed with '''.
The text !##showtokens must be on the line just after !##AAS.
Strings between '' means that are taken as they are. instead
between "" means that all the vars inside will be evaluated.
The !quit command just before the initialization command is placed
to stop possible executions by ASv1.
!msg('This is an AlphaScript v2 file. You can't execute with v1','Wrong Version','i')
!quit
!##AAS
'''!##showtokens ''' Shows the tokens into the Debug Window
''' Logging Data
!tim.start
!log("AlphaScript v@as.ver.major: @sys.user <@sys.date - @sys.time>","@as.path\Log.txt")
''' Menu Memorization
!listadd("About")
!listadd("E-Mail to the Author")
!listadd("-")
!listadd("Try: !Input")
!listadd("Try: !FileRead")
!listadd("Try: !RegRead")
!listadd("-")
!listadd("Quit")
!#MENU
!list("AS Example",10,10)
!if(@out.list=="-") !then(!goto(MENU))
!if(@out.list=="") !then(!goto(END))
!if(@out.list=="Quit") !then(!goto(END))
!if(@out.list=="About") !then(!about)
!if(@out.list=="E-Mail to the Author") !then(!exe("mailto:arcanewood@yahoo.com?subject=AlphaScript v2 (ExFl)"))
!if(@out.list=="Try: !RegRead")
!then(
!regread("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion","ProductName")
!let(ro1="@out.regread")
!regread("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion","VersionNumber")
!msg("Output: @ro1 @out.regread","RegRead Output","i")
)
!if(@out.list=="Try: !FileRead")
!then(
!fileread("@as.path@as.name",1)
!msg("This is the first line of the script:!n""@out.fileread""","FileRead Output","i")
)
!if(@out.list=="Try: !Input")
!then(
!input("Please type something.","Input Test")
!if("@out.input"=="")
!then(!msg("You haven't typed anything!!!","Input Output","i"))
!else(!msg("This is what you've typed:!n""@out.input""","Input Output","i"))
)
!goto(MENU)
''' Closing Sequence
!#END
!log(" [Closed after: @tim.delay secs]","@as.path\Log.txt")
!quit